/*import java.util.Arrays;

class MyArray<T>{
    public Object[] array =new Object[10];
    public void set(int pos,T val){
        array[pos]=val;
    }
    public T get(int pos){
        return (T)array[pos];
    }
    public Object[] getarray(){
        return  array;
    }
}

public class Test {
    public static void main(String[] args) {
        MyArray<String> myArray=new MyArray<>();
        myArray.set(0,"abc");
        String ret = myArray.get(0);
        System.out.println(ret);
        MyArray<Integer>myArray1=new MyArray<>();
        myArray1.set(1,100);
        int tmp = myArray1.get(1);
        System.out.println(tmp);
        Object[]array= myArray.getarray();
        Object[]array1= myArray1.getarray();
        System.out.println(Arrays.toString(array));
        System.out.println(Arrays.toString(array1));
    }
}*/
/*
class Alg<T extends Comparable<T>>{
      public T findMax(T[] array){
        T max=array[0];
          for (int i = 0; i <array.length ; i++) {
              if(array[i].compareTo(max)>0){
                  max=array[i];
              }
          }
          return max;
      }
}
class A implements Comparable <A>{

    @Override
    public int compareTo(A o) {
        return 0;
    }
}*/
/*
class Alg2{
    public <T extends Comparable<T>> T findMax(T[] array){
        T max =array[0];
        for (int i = 0; i <array.length ; i++) {
            if(array[i].compareTo(max)>0){
                max=array[i];
            }
        }
        return  max;
    }
}
public class Test {
    public static void main(String[] args) {
            Alg2 alg2 =new Alg2();
            Integer[]array={1,3,5,7,9};
            Integer ret = alg2.findMax(array);
            System.out.println(ret);
    }
}
*/
/*
class Alg2{
    public static <T extends Comparable<T>> T findMax(T[] array){
        T max =array[0];
        for (int i = 0; i <array.length ; i++) {
            if(array[i].compareTo(max)>0){
                max=array[i];
            }
        }
        return  max;
    }
}
public class Test {
    public static void main(String[] args) {
        Integer[]array={1,3,5,7,9};
        Integer ret = Alg2.findMax(array);
        System.out.println(ret);
    }
}
*/